﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
//using ExcelExtracter;

namespace ExcelProcess
{
    public class excelProcess
    {
        private String excel_name;
        private String sheet_name;
        private String sql_name;
        
        private int start_id;
        private ExcelExtracter ee;

        public excelProcess(String excel, String sheet, String sql, int id)
        {
            excel_name = excel;
            sheet_name = sheet;
            sql_name = sql;
            
            ee = new ExcelExtracter(excel, sheet, excel+".tmp");
            start_id = id;

        }
        public void output()
        {
            ee.Execute();
            DataProcess.DataProcess process = new DataProcess.DataProcess(excel_name+".tmp",excel_name+".out",sql_name,start_id);
            if (File.Exists(excel_name + ".tmp"))
                File.Delete(excel_name + ".tmp");

        }

    }
}
